<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;


Route::get('product/list', 'product/lists');

// 不需要登陆验证
Route::group(function() {

    // 登录注册相关
    Route::post('login', 'auth/login');

    // 帮助类
    Route::get('util/generate-code', 'util/generateCode');

    // 登录/注册相关
    Route::group('auth', function () {
        Route::post('mobile-register', 'mobileRegister');
        Route::post('mobile-login', 'mobileLogin');
    })->prefix('auth/');
});


// 需要登陆验证
Route::group(function() {

    // 订单相关
    Route::group('order', function () {
        Route::get('list', 'lists');
        Route::post('create', 'create');
    })->prefix('order/');
})->middleware([]);

